define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'mall.withdrawal/index',
        edit_url:'mall.withdrawal/edit'
    };

    var Controller = {
        index: function () {
            ea.table.render({
                init: init,
                toolbar: ['refresh',
                    [],
                ],
                cols: [[
                    {type: "checkbox"},
                    {field: 'id', width: 80, title: 'ID',search: false},
                    {field: 'nickName', minWidth: 80, title: '用户昵称',search: false},
                    {field: 'manager_name', minWidth: 100, title: '商家名称',search: true},
                    {field: 'realname', minWidth: 80, title: '姓名'},
                    {field: 'bankno', minWidth: 80, title: '银行卡号'},
                    {field: 'bankname', minWidth: 80, title: '银行名称'},
                    {field: 'money', minWidth: 100, title: '提现金额'},
                    {field: 'status', minWidth: 80,title: '状态', selectList: {0: '待打款', 1: '提现成功'}},
                    {field: 'create_time', minWidth: 80, title: '申请时间', search: 'range'},
                    {
                        width: 150,
                        title: '操作',
                        templet: ea.table.tool,
                        operat: [
                            [{
                                text: '确认打款',
                                url: init.edit_url,
                                method: 'open',
                                auth: 'edit',
                                class: 'layui-btn layui-btn-xs layui-btn-normal',
                                extend: 'data-full="true"',
                                show:[
                                    {"name":"status","value":"0"}
                                ]
                            }],
                        ]
                    },
                ]],
            });

            ea.listen();
        },
        edit:function (){
            ea.listen();
        }
    };
    return Controller;
});